package com.knightcloud.common.base.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * orm基础bean
 *
 * @author knight
 */
@Getter
@Setter
public class OrmBaseBean {

	@Schema(name = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createDate;

	@Schema(name = "更新时间")
	@TableField(fill = FieldFill.UPDATE)
	private LocalDateTime updateDate;

	@Schema(name = "删除时间")
	@TableField(select = false, fill = FieldFill.UPDATE)
	private LocalDateTime deleteDate;

	@TableLogic
	@TableField(select = false, fill = FieldFill.UPDATE)
	@Schema(name = "是否删除0否1是")
	private Integer deleted;

}
